<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_product_carousel.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/mall/Mall_product_carousel.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'id',
        footer: 'Foots',
        cnName: '轮播图',
        name: 'Mall_product_carousel',
        url: '/productCarousels/',
        sortName: 'createDate',
      },
      extend: extend,
      editFormFields: {
        carouselCode: '',
        carouselName: '',
        imageAddress: [],
        isAvailable: '',
        startingTime: '',
        modifyDate: '',
        createDate: '',
        modifyID: '',
        createID: '',
        modifier: '',
        creator: '',
      },
      editFormOptions: [
        [
          { title: '轮播图名称', field: 'carouselName', type: 'string' },
          { title: '轮播图', field: 'carouselCode', type: 'string', hidden: true },
          { title: '是否可用', required: true, field: 'isAvailable', type: 'switch', dataKey: 'enable' },
        ],
        [{ title: '轮播图', field: 'imageAddress', type: 'imgupgrade', multiple: true, maxFile: 3 }],
      ],
      searchFormFields: { carouselName: '', isAvailable: '', creator: '', createDate: '', modifyDate: '' },
      searchFormOptions: [
        [
          { title: '轮播图名称', field: 'carouselName', type: 'string' },
          { title: '是否可用', field: 'isAvailable', type: 'select', dataKey: 'enable' },
          { title: '创建时间', field: 'createDate', type: 'datetime' },
        ],
      ],
      columns: [
        { field: 'id', title: '产品轮播图主键(2表)', type: 'int', width: 90, hidden: true, readonly: true, require: true, align: 'left' },
        //{field:'carouselCode',title:'轮播图编码',type:'string',width:220,align:'left',sortable:true},
        { field: 'carouselName', title: '轮播图名称', type: 'string', width: 220, align: 'left' },
        { field: 'imageAddress', title: '图片', type: 'imgupgrade', width: 220, align: 'left' },
        { field: 'isAvailable', title: '是否可用', bind: { key: 'enable', data: [] }, type: 'sbyte', width: 90, align: 'left' },
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 120, align: 'left', sortable: true },
        { field: 'creator', title: '创建人', type: 'string', width: 80, align: 'left' },
        { field: 'modifier', title: '修改人', type: 'string', width: 80, align: 'left' },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 120, align: 'left', sortable: true },
      ],
      detail: {
        cnName: '#detailCnName',
        columns: [],
        sortName: '',
        key: '',
      },
    }
  },
}
export default vueParam
</script>
